﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Mail;
using System.IO;
using System.Net;

namespace Common
{
    public static class EMailHelper
    {
        public static void SendEmail(string msg)
        {
            try
            {
                SmtpClient smtp = new SmtpClient();
                MailMessage mm = new MailMessage();
                smtp.Host = "smtp.163.com";
                smtp.Port = 25;
                smtp.Credentials = new System.Net.NetworkCredential("shangzjtest2012@163.com", "1qaz2wsxE");
                mm.Body = msg;
                mm.Subject = "会员身份转换申请!";
                mm.Priority = MailPriority.High;
                MailAddress ma = new MailAddress("xinyouposeidon2012@163.com");

                mm.To.Add(ma);
                mm.From = new MailAddress("shangzjtest2012@163.com");
                smtp.Send(mm);
            }
            catch (Exception ex)
            { }
        }
    }
}
